package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Date;

@FieldTypeAnnotation(tableName = "t_l_washe_disconnect", autoSave = true)
public class LogWasheDisconnect {

    @FieldTypeAnnotation(desc = "玩家ID", isIndex = true)
    private long userId;
    @FieldTypeAnnotation(desc = "类型，1掉线，2重连，3其他")
    private int type;
    @FieldTypeAnnotation(desc = "最后ping时间")
    private Date lastPing;
    @FieldTypeAnnotation(desc = "日志时间")
    private Date time;

    public LogWasheDisconnect(long userId, int type, Date lastPing) {
        this.time = new Date();

        this.userId = userId;
        this.type = type;
        this.lastPing = lastPing;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Date getLastPing() {
        return lastPing;
    }

    public void setLastPing(Date lastPing) {
        this.lastPing = lastPing;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }
}
